<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    x:Class="OpenLS.Chart.UI.ChartBackgroundResources"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:chart="http://schemas.Kherty.com/office/2007/chart"
    xmlns:chartui="clr-namespace:OpenLS.Chart.UI"
    xmlns:drawing2="clr-namespace:OpenLS.Drawing.UI;assembly=OpenLS.Drawing.UI"
    xmlns:Internals="clr-namespace:OpenLS.Chart.UI.Internals"
    >
    <DataTemplate DataType="{x:Type  chart:ChartBase}" x:Key="ChartSurfacesTemplate">
        <Viewport3D Name="vp" Style="{x:Static chartui:Chart3DViewportResources.Chart3DViewportStyle}">
            <ModelVisual3D>
                <ModelVisual3D.Content>
                    <AmbientLight Color="#555555" />
                </ModelVisual3D.Content>
            </ModelVisual3D>
            <ModelVisual3D>
                <ModelVisual3D.Content>
                    <DirectionalLight Color="Gray" Direction="-1,-1,-1" />
                </ModelVisual3D.Content>
            </ModelVisual3D>
            <ModelVisual3D>
                <ModelVisual3D.Content>
                    <DirectionalLight Color="White" Direction="0, 0, -1" />
                </ModelVisual3D.Content>
            </ModelVisual3D>
            <ModelVisual3D>
                <ModelVisual3D.Content>
                    <MultiBinding Converter="{x:Static Internals:ChartConverters.SurfaceFactory}">
                        <Binding Path="(chartui:ChartElement.ChartArea).Floor" ElementName="vp"/>
                        <Binding Path="(chartui:ChartElement.ChartArea)" ElementName="vp"/>
                        <Binding Path="(chartui:ChartElement.ChartInfo)" ElementName="vp"/>
                        <Binding Path="(chartui:ChartElement.ChartArea).Floor.ShapeProperties.FillProperties" ElementName="vp" />
                        <Binding ElementName="vp" Path="(drawing2:DrawingElement.ColorScheme)"/>
                        <Binding ElementName="vp" Path="(chartui:ChartElement.Style)"/>
                    </MultiBinding>
                </ModelVisual3D.Content>
            </ModelVisual3D>
            <ModelVisual3D>
                <ModelVisual3D.Content>
                    <MultiBinding Converter="{x:Static Internals:ChartConverters.SurfaceFactory}">
                        <Binding Path="(chartui:ChartElement.ChartArea).SideWall" ElementName="vp"/>
                        <Binding Path="(chartui:ChartElement.ChartArea)" ElementName="vp"/>
                        <Binding Path="(chartui:ChartElement.ChartInfo)" ElementName="vp"/>
                        <Binding Path="(chartui:ChartElement.ChartArea).SideWall.ShapeProperties.FillProperties" ElementName="vp" />
                        <Binding ElementName="vp" Path="(drawing2:DrawingElement.ColorScheme)"/>
                        <Binding ElementName="vp" Path="(chartui:ChartElement.Style)"/>
                    </MultiBinding>
                </ModelVisual3D.Content>
            </ModelVisual3D>
            <ModelVisual3D>
                <ModelVisual3D.Content>
                    <MultiBinding Converter="{x:Static Internals:ChartConverters.SurfaceFactory}">
                        <Binding Path="(chartui:ChartElement.ChartArea).BackWall" ElementName="vp"/>
                        <Binding Path="(chartui:ChartElement.ChartArea)" ElementName="vp"/>
                        <Binding Path="(chartui:ChartElement.ChartInfo)" ElementName="vp"/>
                        <Binding Path="(chartui:ChartElement.ChartArea).BackWall.ShapeProperties.FillProperties" ElementName="vp" />
                        <Binding ElementName="vp" Path="(drawing2:DrawingElement.ColorScheme)"/>
                        <Binding ElementName="vp" Path="(chartui:ChartElement.Style)"/>
                    </MultiBinding>
                </ModelVisual3D.Content>
            </ModelVisual3D>
        </Viewport3D>

    </DataTemplate>
</ResourceDictionary>